package LexicalAnalyzer;

/**
 * 
 * @author vcolegro, akanter
 *
 */
public abstract class Token {
	
	public int type;
	
	public long linenumber;
	
	protected String content;  //Includes token type in name, (e.g. id(variableName) )
	
	/**
	 * Constructor, only for use of the calling children
	 * @param s, contents of token
	 */
	protected Token(String s){
		linenumber = Lexer.LINENUMBER;
		content = s;
	}
	
	/**
	 * toString method!
	 * @return 
	 */
	public String toString(){
		return content; 
	}
	
	/**
	 * Getter for text type, without identifying text  (e.g. NOT "id(variableName)", but just "id")
	 */
	public String getContent(){
		return content;
	}
	
	/**
	 * To change the Content string (created for the purpose of passing error messages and for ease of processing Constants)
	 */
	protected void setContent(String s){
		this.content = s; 
	}
}
